package system

import (
	"context"
	"gf_blog_admin/internal/service"

	"gf_blog_admin/api/system/v1"
)

func (c *ControllerV1) RoleAssignPermissions(ctx context.Context, req *v1.RoleAssignPermissionsReq) (res *v1.RoleAssignPermissionsRes, err error) {
	res = &v1.RoleAssignPermissionsRes{}
	err = service.SysRole().AssignPermissions(ctx, req.Id, req.Permissions)
	return
}
